/*
 * BirdShootingLine.cpp
 *
 *  Created on: Nov 17, 2012
 *      Author: lucas
 */

#include "BirdShootingLine.h"
#include <cstdlib>
#include <ctime>


BirdShootingLine::BirdShootingLine(double x, double y, double height, birdDirections bd) : x(x), y(y), height(height), birdDirection(bd) {
}

birdDirections BirdShootingLine::getDirection() {
	birdDirections ret;
	srand(time(NULL));
	switch (birdDirection) {
	case Left:
		ret = Left;
		break;
	case Right:
		ret = Right;
		break;
	case Both:
		ret = (birdDirections)(rand() % 2);
		break;
	default:
		ret = Left;
		break;
	}
	return ret;
}

void BirdShootingLine::setX(double x) {

}

double BirdShootingLine::getX() const {
	return x;
}

void BirdShootingLine::setY(double y) {
}

double BirdShootingLine::getY() const {
	return (y + (rand() % (int)height));
}

BirdShootingLine::~BirdShootingLine() {
}

